<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="apple-touch-fullscreen" content="yes">
<meta name=”apple-mobile-web-app-capable” content=”yes” />
<meta name="keywords" content="leanote,leanote.com">
<meta name="description" content="leanote, Not Just A Notepad!">
<title class="lang">Leanote, Not Just A Notepad</title>

<link href="public/css-libs/bootstrap.css" rel="stylesheet" />
<!-- 先加载, 没有样式, 宽度不定 -->
<link rel="stylesheet" href="public/tinymce/skins/custom/skin.min.css" rel="stylesheet"/>
<!-- leanote css -->
<link href="public/css-libs/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet" />
<link href="public/css-libs/ztree/zTreeStyle.css" rel="stylesheet" />

<!-- mdeditor -->
<link href="public/themes/markdown/meditor.css" rel="stylesheet" />
<!-- markdown theme -->
<link rel="stylesheet" href="public/themes/markdown/default/index.css" type="text/css" id="md-theme"/>

<!-- theme -->
<link rel="stylesheet" href="public/themes/default.css" type="text/css"/>
<link rel="stylesheet" href="public/themes/presentation.css" type="text/css" disabled id="themePresentation"/>
<link rel="stylesheet" href="public/themes/writting.css" type="text/css" disabled id="themeWritting"/>

<!-- for change theme -->
<link rel="stylesheet" href="" type="text/css" id="theme"/>

<script>
// for windows
if(process.platform != 'darwin') {
  document.write('<link rel="stylesheet" href="public/themes/windows.css" type="text/css" />');
}
function log(o) {
  // console.trace(o);
}
</script>
</head>
<body class="clearfix init">
  <div id="topDrag"></div>
  <div id="topDrag2"></div>
  <!-- 关闭, 最小化, 最大 -->
  <div id="winTool" class="win-tool clearfix">
    <a class="tool-close"></a>
    <a class="tool-min"></a>
    <a class="tool-max"></a>
  </div>

  <!-- 演示模式 -->
  <div id="presentation">
    <!-- 工具 -->
    <div class="pren-tool">
      <a class="pren-tool-close"><i class="fa fa-remove"></i></a>
      <a class="pren-tool-bg-color"><i class="fa fa-adjust"></i></a>
      <hr />
      <a class="pren-tool-text-size-min"><i class="fa fa-font"></i></a>
      <a class="pren-tool-text-size-max"><i class="fa fa-font"></i></a>
      <hr />
      <a class="pren-tool-pre"><i class="fa fa-long-arrow-up"></i></a>
      <a class="pren-tool-next"><i class="fa fa-long-arrow-down"></i></a>

    </div>
    <!-- 标题 -->
    <div class="pren-title">
    </div>
    <!-- 内容 -->
    <div class="pren-content">
    </div>
  </div>

  <div id="page" class="clearfix">
    <div id="mainMask">
        <table><tr><td>
        <div id="loadingLogo">
          <span class="logo"></span>
        </div>
        <div class="init-loading"><img src="public/images/loading-32.gif"></div>
        <div id="allProcess" class="lang">loading...</div>
        <div id="syncProcess">
        </div>
      </td></tr></table>

      <div class="loading-footer">
        <a onclick="switchAccount()" class="lang">Switch account</a>
      </div>
    </div>

    <div id="pageInner">

      <!-- header start -->
      <div id="header" style="display: none">
        <!-- 全局按钮 -->
        <div class="pull-left" style="" id="newNoteWrap">
          <!-- 新建笔记 -->
          <!-- 只为新建别人的笔记 -->
          <div id="newSharedNote" style="display: none">
            <a id="newSharedNoteBtn">
              <i class="fa fa-file-o"></i>
              <span class="new-note-text lang">New note</span>
              <span class="new-note-text-abbr lang">New</span>
            </a>
            <span class="new-split">|</span>
            <a id="newShareNoteMarkdownBtn" title="New markdown note">
              <span class="new-markdown-text">Markdown</span>
              <span class="new-markdown-text-abbr">Md</span>
            </a>
            <span class="for-split"> - </span>
            <span id="curNotebookForNewSharedNote" notebookId="" userId=""></span>
            <div class="dropdown" style="display: inline-block">
              <a id="listShareNotebookDropdownMenu" class="ios7-a dropdown-toggle" data-toggle="dropdown">
                <i class="fa fa-angle-down"></i>
              </a>
              <div class="dropdown-menu dropdown-list" id="searchNotebookForAddShareDropdownList" >
                <ul id="notebookNavForNewSharedNote"></ul>
              </div>
            </div>
          </div>
        </div>

        <div class="pull-left" id="leanoteMsg">
          <span id="msg" style="display: inline-block;"></span>
          <span id="loading">
          </span>
        </div>

        <div class="pull-right top-nav writting-hide" id="myBlog">
          <a target="_blank" href="{{$.blogUrl}}/{{.userInfo.Username}}" class="lang">
            Blog
          </a>
        </div>

        <div style="clear: both"></div>
      </div>
      <!-- header end -->

      <div id="mainContainer" class="clearfix">

        <div id="leftNotebook">
          <div id="notebook">
            <div class="folderNote closed" id="myStarredNotes">
              <div class="folderHeader">
                <i class="fa fa-star-o fa-left"></i>
                <span class="lang">
                  Starred
                </span>
              </div>

              <ul class="folderBody" id="starNotes">
                <li noteId=""><a><span class="delete-star" title="Remove">X</span></a></li>
              </ul>
            </div>

            <div class="folderNote opened" id="myNotebooks">
              <div class="folderHeader clearfix">
                <i class="fa fa-book pull-left fa-left"></i>
                <span class="pull-left lang">
                  Notebook
                </span>
                <div class="pull-right" id="addNotebookPlus" title="Add notebook">
                  <i class="fa  fa-plus" title="Add notebook"></i>
                </div>
              </div>

              <div class="folderBody">
                <input type="text" class="form-control lang-placeholder" id="searchNotebookForList" placeholder="Search notebook"/>
                <ul class="ztree" id="notebookList"></ul>
                <ul class="ztree" id="notebookListForSearch"></ul>
              </div>
            </div>

            <div class="folderNote closed" id="myTag">
              <div class="folderHeader">
                <i class="fa fa-bookmark fa-left"></i>
                <span class="lang">
                  Tag
                </span>
              </div>

              <ul class="folderBody clearfix" id="tagNav">
              </ul>
            </div>

          </div>

          <!--
          底下
          用于同步
          -->
          <div id="notebookBottom" class="clearfix">
            <div class="progress sync-progress hide" id="syncProgress">
              <div class="progress-bar"  role="progressbar" aria-valuenow="5" aria-valuemin="0" aria-valuemax="100" style="width: 5%;" id="syncProgressBar">
              </div>
            </div>
            <!--  fa-spin -->
            <a class="pull-left sync-icon">
              <i class="fa fa-refresh" id="syncRefresh" title="Sync"></i>
              <i class="fa fa-exclamation-triangle" id="syncWarning" title="Sync error!!"></i>
            </a>
            <div class="pull-right" id="myProfile">
              <div class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown">
                  <span class="username" id="username">
                  </span><i class="fa fa-angle-down account-more"></i>
                </a>

              </div>
            </div>
          </div>
        </div>

        <div class="noteSplit" id="notebookSplitter"></div>

        <div id="noteAndEditor">
          <div id="noteAndEditorMask">
            <img src="public/images/loading-24.gif"/>
            <br />
            <span class="lang">loading</span>...
          </div>

          <div id="noteList">
            <div class="clearfix" id="notesAndSort" style="position: relative">

              <!-- 我的笔记本 -->
              <div id="myNotebookNavForListNav">
                  <span id="curNotebookForListNote" class="lang">Newest</span>
              </div>

              <div class="pull-left" id="tagSearch" style="line-height: 38px">
              </div>

              <div id="viewModeDropdown">
                <span class="fa fa-th-list" title="Switch view"></span>                
              </div>

              <div id="newMyNote">
                <a id="newNoteBtn" title="New note">
                  <span class="new-note-text"  title="New note">+</span>
                </a>
                <span class="new-split">|</span>
                <a id="newNoteMarkdownBtn" title="New markdown note">
                  <span class="new-markdown-text" title="New markdown note">+M</span>
                </a>
                <span id="curNotebookForNewNote" notebookId="" style="display: none"></span>
              </div>

          </div>

          <!-- 搜索 -->
          <form class="navbar-form form-inline" id="searchNote" onsubmit="return false;">
            <input class="form-control lang-placeholder" placeholder="Search note" type="text" id="searchNoteInput">
          </form>

          <!-- 笔记列表 -->
          <!-- wrap 为了slimScroll -->
          <div id="noteItemListWrap">
            <ul id="noteItemList" class="snippet-view">
            </ul>
          </div>
        </div>

        <div class="noteSplit" id="noteSplitter"></div>

        <div id="note" class="read-only-editor">

          <!-- 遮罩, 为了resize3Columns用 -->
          <div id="noteMask" class="note-mask"></div>

          <div id="noteMaskForLoading" class="note-mask"> <!-- z-index: 11 -->
            <img src="public/images/loading-24.gif"/>
            <br />
            <span class="lang">loading...</span>
          </div>

          <div id="editorMask">  <!-- z-index: 10 -->
            <span class="lang">noNoteNewNoteTips</span>
            <br />
            <br />
            <div id="editorMaskBtns">
              <a class="note lang">newNote</a>
              <a class="markdown lang">newMarkdownNote</a>
            </div>
            <div id="editorMaskBtnsEmpty" class="lang">canntNewNoteTips</div>
          </div>

          <div id="batchMask" class="note-mask"> <!-- z-index: 99 -->
            <div class="batch-ctn" id="batchCtn"></div>
            <div class="batch-info">
              <div class="batch-status"></div>
              <p><i class="fa fa-cog"></i></p>
            </div>
          </div>

          <div id="noteTop">
            <!-- 左侧放tag, 右侧放按钮, 比如save, info, move, delete -->
            <div id="tool" class="clearfix">

              <div id="noteTitleDiv">
                <input name="noteTitle" id="noteTitle" class="lang-placeholder" value="" placeholder="UnTitled" tabindex="1" />
              </div>

              <ul class="pull-right" id="editorTool">

                <li><a class="ios7-a lang-title lang-title" id="editBtn"
                  data-toggle="dropdown" title="ctrl/cmd+e Toggle Modify with Readonly">
                  <span class="fa"></span>
                  </a></li>

                <li class="dropdown" id="attachDropdown">
                  <a class="ios7-a dropdown-toggle lang-title" data-toggle="dropdown" id="showAttach" title="Attachments">
                    <span class="fa fa-paperclip"></span>
                    <span id="attachNum"></span>
                  </a>
                  <div class="dropdown-menu" id="attachMenu">
                    <ul id="attachList">
                    </ul>
                    <form id="uploadAttach" method="post" action="/attach/UploadAttach" enctype="multipart/form-data">
                        <div id="dropAttach" class="dropzone">
                            <input id="chooseFileInput" type="file" name="file" multiple/>
                            <input id="downloadFileInput" type="file" nwsaveas="" style=""/>

                            <a id="chooseFile" class="btn btn-success btn-choose-file">
                              <i class="fa fa-upload"></i>
                              <span class="lang">Choose Files</span>
                            </a>

                        </div>
                        <div id="attachUploadMsg">
                        </div>
                    </form>
                  </div>
                </li>

                <li><a class="ios7-a lang-title" id="contentHistory"
                  data-toggle="dropdown" title="Histories">
                  <span class="fa fa-history"></span>
                  </a></li>

                  <li><a class="ios7-a lang-title" id="writtingToggle"
                  data-toggle="dropdown" title="Toggle writting mode">
                  <span class="fa fa-expand"></span>
                  </a></li>
              </ul>
            </div>
          </div>

          <div id="editor">
            <!-- 编辑器 -->
            <div id="mceToolbar">
              <div id="mceToolbarContainer">
                <div id="popularToolbar"
                  style="position: absolute; right: 30px; left: 0"></div>
                  <a id="moreBtn">
                    <i class="more-fa fa fa-angle-down"></i>
                  </a>
              </div>

              <!-- 查看信息 -->
              <div id="infoToolbar" class="info-toolbar">

                <span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
                <span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
              </div>
            </div>

            <div class="editorBg"></div>
            <div id="leanoteNav" class="leanoteNav">
              <h1>
                <i class="fa fa-align-justify" title="Note nav"></i>
                <span class="lang">nav</span>
              </h1>
              <div id="leanoteNavContent" class="leanoteNavContent">
              </div>
            </div>

            <!-- leaui image drop image to editor-->
            <form id="upload" method="post" action="/file/uploadImageLeaui" enctype="multipart/form-data" style="margin-top: 5px;">
                <div id="drop">
                       Drop images to here
                    <input type="file" name="file" multiple style="display: none"/>
                </div>
                <ul id="uploadMsg">
                </ul>
            </form>

            <!-- 由此可以算高度 -->
            <div id="editorContentWrap">
              <div id="editorContent" name="editorContent" tabindex="2" >
                Loading...
              </div>
            </div>
          </div>

          <div id="mdEditor">

            <div class="layout-wrapper-l1">
                <div class="layout-wrapper-l2">
                    <div class="navbar navbar-default">
                        <div class="navbar-inner" id="wmd-button-bar">
                            <div id="mdInfoToolbar" class="info-toolbar">

                              <span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
                              <span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
                            </div>
                            <div class="wmd-button-bar-inner">
                              <ul class="nav left-buttons">
                                  <li class="wmd-button-group1 btn-group"></li>
                              </ul>
                              <ul class="nav left-buttons">
                                  <li class="wmd-button-group2 btn-group"></li>
                              </ul>
                              <ul class="nav left-buttons">
                                  <li class="wmd-button-group3 btn-group"></li>
                              </ul>
                              <ul class="nav left-buttons">
                                  <li class="wmd-button-group4 btn-group"></li>
                              </ul>
                              <!-- 帮助 -->
                               <ul class="nav left-buttons">
                                  <li class="wmd-button-group6 btn-group">
                                    <li class="wmd-button btn btn-success" id="wmd-help-button" title="Markdown syntax" style="left: 0px; display: none;"><span style="display: none; background-position: 0px 0px;"></span><i class="fa fa-question-circle"></i></li>
                                  </li>
                              </ul>
                            </div>
                        </div>
                        <div class="editorBg"></div>
                    </div>
                    <div class="layout-wrapper-l3">
                      <div id="left-column">
                          <pre id="wmd-input" class="form-control"><div id="wmd-input-sub" class="editor-content mousetrap" contenteditable=true></div><div class="editor-margin"></div></pre>
                          <!-- v2 markdown lightmode需要 -->
                          <div class="textarea-helper"></div>
                        </div>
                        <div id="right-column">
                          <div class="preview-panel panel-open" id="preview-panel">
                            <div id="mdSplitter2" class="layout-resizer layout-resizer-preview open" style="-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); touch-action: none;"></div>
                              <div class="layout-toggler layout-toggler-preview btn btn-info open" title="Toggle preview" data-open="1"><i class="fa fa-angle-right"></i></div>
                              <div class="preview-container">
                                  <div id="preview-contents">
                                      <div id="wmd-preview" class="preview-content"></div>
                                  </div>
                              </div>
                          </div>
                        </div>
                    </div>
                    <div class="extension-preview-buttons">
                  <div id="leanoteNavMd" class="leanoteNav">
                    <h1>
                      <i class="fa fa-align-justify" title="Note nav"></i>
                      <span class="lang">nav</span>
                    </h1>
                    <div id="leanoteNavContentMd" class="leanoteNavContent table-of-contents">
                    </div>
                  </div>
                    </div>
                </div>
                <div id="wmd-button-bar" class="hide"></div>
            </div>

          </div>

          <div id="editorBottom">
            <div id="tagInputBox" class="clearfix">
              <i class="fa fa-bookmark-o" id="tagIcon"></i>
              <div id="tags">
              </div>
              <div class="dropup" id="tagInputGroup">
                <a class="dropdown-toggle" data-toggle="dropdown" id="dropdownTrigger"></a>
                <span class="add-tag-text lang" id="tagInputPrompt">clickAddTag</span>
                <input type="text" id="tagInput" />
                <ul class="dropdown-menu" id="tagSuggestion">
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- v1 -->
      <!-- Hidden Popup Modal -->
      <div class="modal fade bs-modal-sm" id="editorDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">

              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="editorDialog-title"></h4>
              </div>

              <div class="modal-body">
              <p></p>
              <div class="input-group">
                <span class="input-group-addon">
                  <i></i>
                </span>
                <input type="text" class="form-control" placeholder="">
              </div>
              </div>

              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" id="editorDialog-confirm">confirm</button>
              </div>

            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->
      <!-- 弹出框 模板 -->
      <div class="modal fade bs-modal-sm" id="leanoteDialogRemote" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
      </div>

      <div class="modal fade bs-modal-sm" id="leanoteDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">

            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title" id="modalTitle">操作</h4>
            </div>

            <div class="modal-body">
            内容区
            </div>

            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              <button type="button" class="btn btn-primary">Save changes</button>
            </div>

          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->

      <!-- 升级框 -->
      <div class="modal fade bs-modal-sm" id="upgradeDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">
          <div class="modal-header">
              <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> -->
              <h4 class="modal-title modalTitle lang">Check for updates</h4>
          </div>
          <div class="modal-body" id="upgradeDialogBody">
            <div class="cur-version-info"><span class="lang">Current version</span>: <span class="cur-version"></span></div>

            <div class="get-next-version-info-loading lang">
              Checking for udpates...
            </div>

            <!-- 下一版本信息 -->
            <div class="next-version-info">
            </div>
            <!-- 升级进度 -->
            <div class="upgrade-progress">
            </div>
          </div>
          <div class="modal-footer ">
            <button type="button" class="btn btn-default upgrade-cancel-btn lang" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary upgrade-btn lang" data-dismiss="modal" disabled>Upgrade</button>
          </div>

          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->

      <!-- 本地帐户警告 -->
      <div class="modal fade bs-modal-sm" id="localAccountDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">
          <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title modalTitle lang">Local account warning</h4>
          </div>
          <div class="modal-body lang">localAccountTips</div>
          <div class="modal-footer ">
            <label><input type="checkbox" id="localAccountDialogCheckbox"/> <span class="lang">Don't Show Anymore</span></label>
            <button type="button" class="btn btn-default upgrade-cancel-btn lang" data-dismiss="modal">Close</button>
          </div>

          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->

      <!-- loading -->
      <div class="modal fade bs-modal-sm" id="loadingDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm modal-large">
          <div class="modal-content">

          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>

          <div class="modal-body" id="loadingDialogBody">
            <img src="public/images/loading-24.gif"/>
            <p id="loadingDialogBodyMsg"></p>

            <div class="progress">
              <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
                <span class="sr-only">60% Complete</span>
              </div>
              <div class="progress-rate"></div>
            </div>

          </div>
          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->

      <!-- notification -->
      <div id="notify">
        <div class="alert alert-dismissible alert-warning" role="alert">
          <button type="button" class="close" ><span aria-hidden="true">&times;</span></button>
          <strong class="title">Warning!</strong>:
          <span class="body">Better check yourself, you're not looking too good.</span>
      </div>
      </div>

      <!-- modal 静态区域, 隐藏区域 -->
      <div class="display: hidden" id="hiddenZone">
        <div class="hide" id="copyDiv"></div>
        <!-- 为了上传图片 -->
        <input id="chooseImageInput" type="file" name="file" multiple style="display: none"/>
        <input id="downloadImgInput" type="file" nwsaveas="" style=""/>
      </div>
  </div>
</div>

<!-- contextTips -->
<div class="context-tips" id="conflictTips">
  <p class="lang">
    This note is conflicted with:
  </p>
  <p>
    <a class="conflict-title">
    </a>
  </p>
  <span class="lang">Maker as resolved</span>: <input type="checkbox" class="conflict-resolved"/>
  <p class="lang">It will not be synced before fixed.</p>
</div>

<script src="public/config.js"></script>
<script src="public/js/jquery-1.9.0.min.js"></script>
<script src="public/js/jquery.ztree.all-3.5.js"></script>
<script src="public/js/app/service.js"></script>
<script src="public/js/lang.js"></script>
<script src="public/js/common.js"></script>
<script>
var UrlPrefix = 'app://leanote';
var UserInfo = {};
window.requireNode = window.require;
window.nodeRequire = window.require;
window.require = undefined;
window.debug = false;
</script>

<!-- 渲染view -->
<script src="public/tinymce/tinymce.min.js"></script>
<script src="public/libs/ace/ace.js"></script>
<script src="public/js/app/api.js"></script> <!-- 本地api -->
<script src="public/js/app/native.js"></script>
<script src="public/js/app/page.js"></script>
<script src="public/js/bootstrap-min.js"></script>
<script src="public/js/app/note.js"></script>
<script src="public/js/app/tag.js"></script>
<script src="public/js/app/notebook.js"></script>
<script src="public/js/object_id.js"></script>

<!-- 使用require js -->
<script src="public/js/require.js"></script>
<!-- 导入插件 执行 -->
<script src="public/js/main.js"></script>
<!-- markdown editor -->
<script src="public/md/main-v2.min.js"></script>
<!-- extra额外 -->
<script src="public/js/dec/main.js"></script>

<script>
window.require = window.requireNode;
</script>
<!-- 升级 -->
<script>
(function () {
  var s = document.createElement('script');
  s.type = 'text/javascript';
  s.src = 'https://leanote.com/js/app_electron.js?t=' + Math.ceil(new Date() / 3600000);
  document.getElementsByTagName('body')[0].appendChild(s);
})();
</script>
</body>
</html>
